function[filteredFeatureVecs] = filterFeatures(featureVecs, featureDefFilePath)
% Filters the features of a given array of feature vectors according to the
% definition in a file.
%
%   INPUT
%   featureVecs.........A set of feature vectors as returned by loadWines()
%                       for example.
%   featureDefFilePath..The path to a file containing a comma-separated
%                       list of feature indizes that shall be used together
%                       for classification.
%   OUTPUT
%   filteredFeatureVecs.The matrix passed to this function via featureVecs,
%                       but just with the features specified in the given
%                       file.

    file = fopen(featureDefFilePath);
    indizes = fscanf(file, '%u,') + 1;
    fclose(file);
    indizes = [1; indizes];
    filteredFeatureVecs = featureVecs(indizes, :);
end
